package com.myproject.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.myproject.model.SysUser;

public interface MapperUser {
	@Select("select * from SysUser")
	@Results({
		@Result(property="username", column="username"),
		@Result(property="password", column="password")
	})
	public List<SysUser> findAllSysUsers();

	@Select("select * from SysUser where username=#{arg0}")
	@Results({
		@Result(property="username", column="username"),
		@Result(property="password", column="password")
	})
	public SysUser findSysUserByUsername(String username);
	
	@Insert("insert into SysUser values("
			+ "#{username},"
			+ "#{password}"
			+ ")")
	public int addSysUser(SysUser user);
}
